package com.hq.ims.data.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.*;
import com.hq.mybatis.base.BaseModel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.ibatis.type.Alias;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * jiang bai ping
 *
 * @Email 526666031@qq.com
 * @Detail 字典项
 */
@Data
@Alias("Dict")
@TableName(value = "dict")
@ApiModel(value = "字典项")
public class Dict extends BaseModel<Dict> implements Serializable {

    @ApiModelProperty(value = "主键ID")
    @TableId(value = "`dict_id`", type = IdType.ASSIGN_UUID)
    private String dictId;

    @ApiModelProperty(value = "数据版本号")
    @TableField(value = "`version`")
    private Integer version;

    @ApiModelProperty(value = "创建用户ID")
    @TableField(value = "`create_user_id`", fill = FieldFill.INSERT)
    private String createUserId;

    @ApiModelProperty(value = "创建用户名称")
    @TableField(value = "`create_user_name`", fill = FieldFill.INSERT)
    private String createUserName;

    @ApiModelProperty(value = "创建时间")
    @TableField(value = "`create_date_time`", fill = FieldFill.INSERT)
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime createDateTime;

    @ApiModelProperty(value = "更新用户ID")
    @TableField(value = "`update_user_id`", fill = FieldFill.INSERT_UPDATE)
    private String updateUserId;

    @ApiModelProperty(value = "更新用户ID")
    @TableField(value = "`update_user_name`", fill = FieldFill.INSERT_UPDATE)
    private String updateUserName;

    @ApiModelProperty(value = "更新时间")
    @TableField(value = "`update_date_time`", fill = FieldFill.INSERT_UPDATE)
    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime updateDateTime;

    @ApiModelProperty(value = "是否删除")
    @TableField(value = "`is_del`")
    private Boolean isDel;

    @ApiModelProperty(value = "名称-给人类识别")
    @TableField(value = "`name`")
    private String name;

    @ApiModelProperty(value = "备注")
    @TableField(value = "`remark`")
    private String remark;

    @ApiModelProperty(value = "父ID")
    @TableField(value = "`parent_id`")
    private String parentId;

    @ApiModelProperty(value = "排序数字")
    @TableField(value = "`rank_num`")
    private Integer rankNum;

    @ApiModelProperty(value = "根节点ID")
    @TableField(value = "`root_id`")
    private String rootId;

    @ApiModelProperty(value = "级别")
    @TableField(value = "`lv`")
    private Integer lv;

    @ApiModelProperty(value = "json参数")
    @TableField(value = "`param`")
    private String param;

    @ApiModelProperty(value = "当前以下的所有子孙节点")
    @TableField(value = "`all_children_count`")
    private Integer allChildrenCount;

    @ApiModelProperty(value = "当前级别的下一级节点")
    @TableField(value = "`cur_next_children_count`")
    private Integer curNextChildrenCount;

    @ApiModelProperty(value = "是否允许编辑当前项")
    @TableField(value = "`is_can_edit_cur_node`")
    private Boolean isCanEditCurNode;

    @ApiModelProperty(value = "是否允许编辑所有子节点")
    @TableField(value = "`is_can_edit_cur_children_nodes`")
    private Boolean isCanEditCurChildrenNodes;
}
